Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WD-8399 - Create add secrets panel #1692

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Conversation

huwshimi
Copy link
Contributor

@huwshimi huwshimi commented Jan 30, 2024

Done

  • Create components for the add secrets form and panel (submitting the form will be handled in WD-8546).

QA

  • Go to the secrets tab.
  • Click "Add secret"
  • The panel should open and display a form.

Details

https://warthogs.atlassian.net/browse/WD-8399

Screenshots

Screenshot 2024-01-30 at 4 05 36 pm

@webteam-app
Copy link

Demo starting at https://juju-dashboard-1692.demos.haus

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (da7ba74) 95.13% compared to head (6322fc0) 95.04%.
Report is 2 commits behind head on main.

Files Patch % Lines
src/panels/AddSecretPanel/AddSecretPanel.tsx 57.14% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1692      +/-   ##
==========================================
- Coverage   95.13%   95.04%   -0.10%     
==========================================
  Files         179      182       +3     
  Lines        5306     5325      +19     
  Branches     1540     1545       +5     
==========================================
+ Hits         5048     5061      +13     
- Misses        238      243       +5     
- Partials       20       21       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

import AddSecretPanel, { TestId } from "./AddSecretPanel";

describe("AddSecretPanel", () => {
it("renders", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a placeholder test for when the functionality is added in https://warthogs.atlassian.net/browse/WD-8546.

label: "",
rotatePolicy: RotatePolicy.NEVER,
}}
onSubmit={(values) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the secret will be created in https://warthogs.atlassian.net/browse/WD-8546.

import Fields from "./Fields";

describe("Fields", () => {
it("renders", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a placeholder test for when the functionality is added in https://warthogs.atlassian.net/browse/WD-8546.

Copy link
Contributor

@vladimir-cucu vladimir-cucu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and works as expected locally! 🚀

@@ -25,6 +26,8 @@ export default function Panels() {
return <ConfigPanel />;
case "audit-log-filters":
return <AuditLogsFilterPanel />;
case "add-secret":
return <AddSecret />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that we use the "Panel" suffix for the names of all the previous panels. For consistency reasons, maybe it makes sense to name this something like "AddSecretPanel"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@huwshimi huwshimi merged commit aa059d2 into canonical:main Jan 30, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants